package com.txzt.gaea.business.plan.domain.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.txzt.gaea.flow.model.FlowBizStep;
import com.txzt.gaea.flow.vo.FlowBizStepVo;
import lombok.Data;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Table;
import org.beetl.sql.core.annotatoin.UpdateIgnore;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


@Data
@Table(name="tb_plan_info")
public class PlanInfo {
    /*id*/
    @AutoID
    private Long id;
    /*计划下达id*/
    private Long packId;
    /*承担部门*/
    private Long departId;
    /*项目序号*/
    @Excel(name = "计划编号")
    private String projectNo;
    /*项目名称*/
    @Excel(name = "项目名称")
    private String projectName;
    /*计划状态*/
    private Integer planStatus;
    /*计划分类*/
    @Excel(name = "计划分类")
    private String planType;
    /*计划子类*/
    private String subType;
    /*计划年度*/
    private String planYear;
    /*项目组长*/
    private Long projectLeader;
    /*立项背景*/
    private String projectBackground;
    /*主要研究内容及要求*/
    @Excel(name = "主要研究内容")
    private String researchContent;
    /*成果形式*/
    @Excel(name = "成果形式")
    private String resultForm;
    /*计划开始年度*/
    private Integer startYear;
    /*计划结束年度*/
    private Integer endYear;
    /*结束年份*/
    private Integer finishYear;
    /*经费预算*/
    @Excel(name = "经费预算(元)")
    private BigDecimal budgetFund;
    /*已安排经费*/
    private BigDecimal arrangeFund;
    /*年度经费*/
    private BigDecimal yearFund;
    /*翌年经费*/
    private BigDecimal nextFund;
    /*联系电话*/
    private String contactPhone;
    /*申报日期*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date declareTime;
    /*任务名称*/
    private String taskName;
    /*专家意见*/
    private String expertOpinion;
    /*专家审核*/
    private String expertCheck;
    /*专家意见附件*/
    private String expertFile;
    /*计划附件*/
    private String planFile;

    /*研制周期*/
    private Integer leadTime;
    /*任务来源*/
    private String taskSource;
    /*任务来源说明*/
    private String taskSourceExplain;

    /*备注*/
    private String remark;
    /*创建人*/
    private Long createBy;
    /*创建时间*/
    @Excel(name = "提报时间",format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    /*更新人*/
    private Long updateBy;
    /*更新时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    /*删除标志*/
    private Integer isDelete;
    /*提报部门*/
    private Long deptId;

    /*生成计划草案时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date draftTime;
    /*下载文档时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date downloadTime;
    /*编报人*/
    private Long writeBy;
    /*编报时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date writeTime;
    /*下发人*/
    private Long assignBy;
    /*下发时间*/
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date assignTime;

    private Long flowId;

    /*创建人名*/
    @UpdateIgnore
    @InsertIgnore
    private String createName;
    /*更新人名*/
    @UpdateIgnore
    @InsertIgnore
    private String updateName;
    /*编报人名*/
    @UpdateIgnore
    @InsertIgnore
    private String writeName;
    /*下发人名*/
    @UpdateIgnore
    @InsertIgnore
    private String assignName;
    /*项目组长名*/
    @UpdateIgnore
    @InsertIgnore
    @Excel(name = "项目组长")
    private String projectLeaderName;
    /*承担部门名*/
    @UpdateIgnore
    @InsertIgnore
    @Excel(name = "承担部门")
    private String departName;
    @Excel(name = "提报部门")
    private String deptName;

    /*当前步骤名称*/
    @UpdateIgnore
    @InsertIgnore
    private String currentStepName;
    /*当前审核人*/
    @UpdateIgnore
    @InsertIgnore
    private String currentStepMember;
    /*当前审核人名*/
    @UpdateIgnore
    @InsertIgnore
    private String currentStepUserName;
    /*当前审核人*/
    @UpdateIgnore
    @InsertIgnore
    @Excel(name = "项目状态")
    private String planStatusName;

    /*当前审核流程步骤*/
    @UpdateIgnore
    @InsertIgnore
    private List<FlowBizStepVo> flowStep;

    /*计划下达信息*/
    @UpdateIgnore
    @InsertIgnore
    private PlanPack planPack;

    /*项目状态*/
    @UpdateIgnore
    @InsertIgnore
    private Integer projectStatus;

    /** 是否可审核 */
    @UpdateIgnore
    @InsertIgnore
    private Boolean isCheck;

    /** 是否可撤回 */
    @UpdateIgnore
    @InsertIgnore
    private Boolean isRevocation;

    /** 是否可撤回流程 */
    @UpdateIgnore
    @InsertIgnore
    private Boolean isFlowRevocation;

    /** 流程类型  1 标准  2 自定义 */
    @UpdateIgnore
    @InsertIgnore
    private String flowType;

    /** 流程步骤  自定义专用 */
    @UpdateIgnore
    @InsertIgnore
    private List<FlowBizStep> stepList;

}
